1. Field of the Invention
The present invention relates to a technique for locating an objective on a form. In particular, the present invention relates to an apparatus for, a method for, and a program for locating an objective on a form, as well as a recording medium that stores the program and is readable by computer. The form includes fixed information and an area for receiving additional information. The apparatus, method, program, and recording medium are used to locate an objective area, such as the additional information area on the form either when digitizing the form and converting the information on the form into character codes using an image scanner and an optical character reader (OCR), or when printing new data in the additional information area.
For example, a meeting attendance form contains fixed information and information to be added later. Copies of the form are delivered to expected attendants, who fill the copies with required information. The copies are collected, and the information added thereto is read by, for example, an OCR. The collected copies may be extended or contracted due to heat, or may be skewed in an automatic document feeder (ADF) of an image scanner. Even if a copy is correctly set at a sheet reading position of the image scanner, it may deviate from the position when a lid is put on the scanner. Thus, the copies frequently move out of position on the scanner. In this case, the OCR is unable to correctly recognize an area on the form where the additional information is present, and therefore, does not read the additional information. Accordingly, it is necessary to provide the OCR with a technique of locating a target area in a scanned image.
2. Description of the Related Art
There are basically three conventional locating methods.
FIG. 28 shows the first of the conventional methods. This method employs a black background when converting a form into a digital image by an image scanner. The method detects edges of the form and estimates the contraction, extension, and skew of the form according to top-to-bottom distances, side-to-side distances, and edge slants. Thereafter, the method locates an additional information area based on distances from the edges.
The second of the conventional methods prints specific marks on a form. The method detects the marks in an image of the form read by OCR. Based on the read marks, the method estimates the contraction, extension, and skew of the form and locates an additional information area in the read image.
The third of the conventional methods extracts easily extractable information such as ruled lines out of an image of a form and relates the extracted information to an additional information area, thereby locating the additional information area.
The first conventional method has a problem in that OCRs having the black background function are expensive and rare. In addition if a form is copied obliquely so that an additional information area on the form shifts from the edges of the copy, the method is unable to locate the additional information area on the copy.
The second conventional method has a problem in that specific marks must be printed on a form, requiring additional labor and cost.
The third conventional method has a problem in that it stably extracts only ruled lines from a form at the present level of the technology, and therefore, is unable to cope with forms having no ruled lines.
An object of the present invention is to provide a locating apparatus, a locating method, and a locating program that combine the second and third conventional methods without involving any of the problems thereof. The present invention partly uses patterns on a form as marks and correctly locates a target part on the form by an OCR that is not provided with the black background function. The present invention needs no specific marks printed on the form and locates the target part on the form irrespective of whether or not the form contains ruled lines. The present invention also provides a recording medium that stores the locating program and is readable by computer.
In order to accomplish the objects, the present invention provides a locating apparatus, a locating method, and a locating program that read an image of a learning form containing fixed information, selecting a predetermined number of small reference areas in the learning-form image, storing data about the small reference areas in a memory, reading an image of an input form that contains the same information as the learning form, collating the input-form image with the small reference area data stored in the memory, retrieving equivalent small areas that contain the same data as the small reference areas from the input-form image, and, according to the relationships between the equivalent and small reference areas, locating a part in the input-form image that corresponds to a given part on the learning form. The present invention also provides a recording medium that stores the locating program and is readable by computer.
The present invention may use a photoelectric converter to prepare the learning-form image. Then, the present invention extracts an edge image from the learning-form image and selects optimum small reference areas from the edge image.
In this way, the present invention uses parts of a learning form as reference marks and locates a target part on an input form by OCR that is not provided with the black background function. The present invention needs no specific marks printed on the input form and locates the target part on the input form irrespective of whether or not the input form contains ruled lines.